/*
 *  Copyright 2007-2008 by Matthias Buch-Kromann <mbk.isv@cbs.dk>.
 *  *
 *  This file is part of the Open-source Dependency Toolkit (OSDT),
 *  see http://code.google.com/p/open-source-dependency-toolkit.
 *  
 *  The OSDT is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as 
 *  published by the Free Software Foundation, either version 3 of 
 *  the License, or (at your option) any later version.
 * 
 *  The OSDT is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 * 
 *  You should have received a copy of the GNU Lesser General Public 
 *  License along with the OSDT in the files COPYING and COPYING.LESSER.
 *  If not, see http://www.gnu.org/licenses.
 */

package org.osdtsystem.graphs;

import java.util.Map;
import java.util.Set;
import org.osdtsystem.functions.Function;
import org.osdtsystem.functions.LocalFunction;
import org.osdtsystem.values.Edge;
import org.osdtsystem.values.Feature;
import org.osdtsystem.values.Layer;
import org.osdtsystem.values.LocalProperty;
import org.osdtsystem.values.Location;
import org.osdtsystem.values.Property;

/**
 * Internal graph methods that shouldn't be used outside the graph package.
 * @author Matthias Buch-Kromann <mbk.isv@cbs.dk>
 */
public interface GraphInternal {
    /**
     * Inform the graph that the local property is used in the 
     * computation of the calling function.
     * @param caller the calling function
     * @param property the local property
     */
    void addCaller(LocalFunction<?,?> caller, LocalProperty<?,?> property);
    void addCaller(LocalFunction<?,?> caller, Location location, Feature feature);
    void addCaller(LocalFunction<?,?> caller, Location location, Layer layer, Feature feature);
    
    Set<LocalFunction> callers(LocalProperty called);

    
    
    // Dependencies between functions and their subfunctions
    // Map<Function,Set<Function>> transitiveParentFunctions();

    /**
     * Mark a particular local property as outdated
     * @param location the location of the local property
     * @param property the property
     */
    void outdateProperty(Location location, Property property);

    /*void update();
    void update(Layer... layers);
    void update(Function... functions);
    void update(Layer layer, Function... functions);*/
}
